import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/agency/login/',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: `/agency/info/`,
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/agency/logout/',
    method: 'post'
  })
}

export function signIn(data) {
  return request({
    url: '/admin/user/',
    method: 'post',
    data: data
  })
}

export function userSet(data, id) {
  return request({
    url: `/admin/user/${id}/`,
    method: 'put',
    data: data
  })
}

export function getImToken() {
    return request({
        url: `/agency/im/token/`,
        method: 'post'
    })
}
